home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / misc / dspice0s / sizmem.c < prev    next >
C/C++ Source or Header  |  1992-11-21  |  2KB  |  63 lines

  1. /* sizmem.f -- translated by f2c (version of 3 February 1990  3:36:42).
  2.    You must link the resulting object file with the libraries:
  3.     -lF77 -lI77 -lm -lc   (in that order)
  4. */
  5.  
  6. #include "f2c.h"
  7.  
  8. /* Common Block Declarations */
  9.  
  10. struct {
  11.     doublereal cpyknt;
  12.     integer istack[1], lorg, icore, maxcor, maxuse, memavl, ldval, numblk, 
  13.         loctab, ltab, ifwa, nwoff, ntab, maxmem, memerr, nwd4, nwd8, 
  14.         nwd16;
  15. } memmgr_;
  16.  
  17. #define memmgr_1 memmgr_
  18.  
  19. /* Table of constant values */
  20.  
  21. static integer c__7 = 7;
  22.  
  23. /*<       subroutine sizmem(ipntr,ksize) >*/
  24. /* Subroutine */ int sizmem_(ipntr, ksize)
  25. integer *ipntr, *ksize;
  26. {
  27.     extern /* Subroutine */ int errmem_();
  28.     extern logical memptr_();
  29.  
  30.     /* Parameter adjustments */
  31.     --ipntr;
  32.  
  33.     /* Function Body */
  34. /*<       implicit double precision (a-h,o-z) >*/
  35. /*<       dimension ipntr(1) >*/
  36. /* spice version 2g.6  sccsid=memmgr 3/15/83 */
  37. /*<       common /memmgr/ cpyknt,istack(1),lorg,icore,maxcor,maxuse,memavl, >*/
  38. /*<      1   ldval,numblk,loctab,ltab,ifwa,nwoff,ntab,maxmem,memerr,nwd4, >*/
  39. /*<      2   nwd8,nwd16 >*/
  40. /*<       logical memptr >*/
  41.  
  42. /* ***  sizmem - determine size of existing block */
  43.  
  44.  
  45. /* ...  check for valid pointer */
  46. /*<       if (memptr(ipntr(1))) go to 10 >*/
  47.     if (memptr_(&ipntr[1])) {
  48.     goto L10;
  49.     }
  50. /*<       memerr=5 >*/
  51.     memmgr_1.memerr = 5;
  52. /*<       call errmem(7,memerr,ipntr(1)) >*/
  53.     errmem_(&c__7, &memmgr_1.memerr, &ipntr[1]);
  54. /*<    10 ksize=istack(ltab+3)/istack(ltab+5) >*/
  55. L10:
  56.     *ksize = memmgr_1.istack[memmgr_1.ltab + 2] / memmgr_1.istack[
  57.         memmgr_1.ltab + 4];
  58. /*<       return >*/
  59.     return 0;
  60. /*<       end >*/
  61. } /* sizmem_ */
  62.  
  63.